package com.cb.domain.service.order;

import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.cb.core.service.GenericManager;
import com.cb.domain.model.order.BOrder;
import com.cb.domain.model.order.Passenger;
import com.cb.domain.model.order.PassengerDto;
import com.cb.core.webapp.paging.PagingBean;

public interface BOrderManager extends GenericManager<BOrder, Long>{
	/**
	 * 按对象的属性进行组合查询，返回符合条件的分页对象列表
	 * @param vo  实体对象
	 * @param pb  分页对象
	 * @return  对象列表
	 */
	public List<BOrder>getByVo(BOrder vo,PagingBean pb);
	
	/**
	 * 保存订单
	 * @param vo
	 */
	public void saveOrderAndLog(BOrder vo,String sendMsg);
	
	/**
	 * 订单同步方法
	 * @return true=成功 false=失败
	 */
	public boolean saveOrderByHttpClient();
	
	public String splitBOrder(BOrder vo);
	public Boolean newSplitBOrder(BOrder vo,String [] passengerIds,Long type);
	
	/**
	 * 根据订单号、主题、商品内容、价钱、支付方式、支付银行创建支付页面
	 * @param out_trade_no
	 * @param subject
	 * @param body
	 * @param total_fee
	 * @param paymethod
	 * @param defaultbank
	 * @return
	 */
	public String getCreateDirectPay(String out_trade_no,String subject,String body,String total_fee,String paymethod,String defaultbank);
	
	public Integer getOrderCountByType(String type);
	
	public List<BOrder> getbOrderByTime(String beginTime, String endTime,
			PagingBean pageBean);
	
	public BOrder findOrderByNo(String orderNo);
	
	/**
	 * 取消pnr
	 * @param pnr
	 * @return
	 */
	public Boolean xePnr(String pnr,String identity);
	
	/**
	 * 把旅客类型装换成页面对象
	 * @return
	 */
	public List<PassengerDto>  passenger2dto(Set<Passenger> set);
	
	/**
	 * 把旅客类型装换成页面对象
	 * @return
	 */
	public Boolean saveByOrderNo(String orderNo,String payPrice);
}



